import { useEffect, useState } from 'react';
import { updateTool, store } from '@/components';
import BasicInformation from './sub/basicInformation';
import Education from './sub/education';
const App = () => {
  const [tabStatus, setTabStatus] = useState({});
  const update = () => {
    setTabStatus(store.getState('TABSTATE'));
  };
  useEffect(() => updateTool.addUpdateFun('home', update), []);
  return (
    <div key={tabStatus?.key}>
      {tabStatus?.key === 'basicInformation' ? (
        <BasicInformation />
      ) : tabStatus?.key === 'education' ? (
        <Education />
      ) : (
        tabStatus.label
      )}
    </div>
  );
};
export default App;
